/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.enrstu.service;

import me.zhengjie.modules.enrstu.service.dto.AdministrativeDivisionDto;
import me.zhengjie.modules.enrstu.domain.AdministrativeDivision;
import me.zhengjie.modules.enrstu.service.dto.AdministrativeDivisionImportDto;

import java.util.List;

/**
* @website https://eladmin.vip
* @description 行政划分区-服务接口
* @author yyx
* @date 2024-10-22
**/
public interface AdministrativeDivisionService {

    List<AdministrativeDivisionDto> findByDivisionLevel(Integer divisionLevel);

    /**
     * 判断是否是直辖市市
     * @param province/
     * @return /
     */
    boolean isMunicipality(String province);


    /**
     * 根据名称查询
     * @param province /
     * @return /
     */
    AdministrativeDivision findByDivisionName(String province);

    /**
     * 根据行政区等级和行政标志查询
     * @param divisionSign /
     * @param divisionLevel /
     * @return /
     */
    List<AdministrativeDivision> findByDivisionSign(Integer divisionSign, Integer divisionLevel);

    /**
     * 根据id和标签查询
     * @param divisionId /
     * @param divisionSign /
     * @return /
     */
    AdministrativeDivision findByDivisionIdAndDivisionSign(Long divisionId, Integer divisionSign);

    /**
     * 根据行政等级查询下级
     * @param administrativeDivisionId /
     * @return /
     */
    List<AdministrativeDivisionDto> findByIdsublevelList(Long administrativeDivisionId);

    /**
     * 过滤无效的行政区划
     * @param administrativeDivisionList/
     * @return /
     */
    List<String> filterInvalidAdministrativeDivision(List<AdministrativeDivisionImportDto> administrativeDivisionList);
}